package com.gold.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gold.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

/**
 * @author XiaoHao
 * @date 2022-05-06 10:24
 */
@Component
public interface UserDao extends BaseMapper<User> {
    /**
     * 查询用户的卡密信息
     * @param user
     * @return
     */
    User getUserCardId(User user);

    /**
     * 插入用户
     * @param user
     */
    void insertUser(User user);

    /**
     * 更新过期卡密用户状态
     */
    void updateUserExpire();

    /**
     * 更新用户和微信绑定
     * @param user
     */
    void updateWechat(User user);
}
